let BaseUrl = "http://localhost:3000";
export function post(url,data){
    return new Promise((resolve,reject)=>{
        uni.request({
            url:BaseUrl+url,
            method:"POST",
            data,
            success:(res)=>{
                resolve(res)
            },
            fail:(err)=>{
                reject(err)
            }
        })
    })
}

export function get(url,query){
    return new Promise((resolve,reject)=>{
        uni.request({
            url:BaseUrl+url,
            method:"GET",
            data:query,
            success:(res)=>{
                resolve(res)
            },
            fail:(err)=>{
                reject(err)
            }
        })
    })
}

